package com.sk.openapicallexample_android.common;

import java.util.Date;

/**
 * Created by yemao on 2017/6/6.
 */
public class CommonUtil {
    /***
     * 生成一个9位数的0-9的随机数
     * @return
     */
    public static String getRandom() {
        String random = "";
        for (int i = 0; i < 9; i++) {
            random += (int) (Math.random() * 10) + "";
        }
        return random;
    }

    /***
     * 生成时间 格式为 Tue, 06 Jun 2017 12:47:06 GMT
     * @param time
     * @return
     */
    public static String dateFormat(long time) {
        Date date = new Date(time);
        return date + "";

    }
}
